package com.hjx.windowtool.bk.dibaqu.server;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Index;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(indexes= {@Index(name="BookChapter_book", columnList = "book_id")})
public class BookChapter  extends DomainObject{
	private String title;
	private String url;
	private String type="文本";
	@ManyToOne(cascade= {},fetch=FetchType.EAGER)
	private BookInfo book;
	
	public String getType() {
		return type==null?"文本":type;
	}
}
